using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemyNightMove : EnemyNightGroundState
{
    public EnemyNightMove(Enemy _enemybase, EnemyStateMachine _stateMachine, string _animBoolName, Enemy_Night _enemy) : base(_enemybase, _stateMachine, _animBoolName, _enemy)
    {
    }

    public override void Enter()
    {
        base.Enter();
    }

    public override void Exit()
    {
        base.Exit();
    }

    public override void Update()
    {

        base.Update();
        enemy.SetVelocity(2 * enemyBase.moveSpeed * enemyBase.facingDir, 0);
        if (!enemy.IsGroundDected() || enemy.IsWallDected())
        {
            enemy.Flip();
        }
    }
}
